import BottomTabBar from '@/common/BottomTabBar';
import React from 'react';
import styles from './index.less';
import { ListView, List, SearchBar } from 'antd-mobile';
import { Link } from 'umi';
const Item = List.Item;

export default () => {
    const gameList = [
        { name: '牛角棋', link: '/games/njq' },
        { name: '五子棋', link: '/games/wzq' },
        { name: '俄罗斯方块', link: '/games/elsfk' },
        { name: '游戏4', link: '/games/4' },
        { name: '游戏5', link: '/games/5' },
    ];
    return (
        <div className={styles.game}>
            <BottomTabBar pageKey="gameList">
                <List renderHeader={() => '小游戏列表'}>
                    {
                        gameList.map((game, index) => (
                            <Item key={index}
                                extra={<Link to={game.link}>去玩</Link>}
                            >{game.name}</Item>
                        ))
                    }
                </List>
            </BottomTabBar>
        </div>
    );
}
